#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
	srand((unsigned int)time(NULL));
	int a = 0;
	int b[10] = { 0 };
	for (a = 0; a < 10; a++)
	{
		b[a] = rand() % 20 + 1;
	}
	for (a = 0; a < 10; a++)
	{
		printf("%d ", b[a]);
	}
	printf("\n");
	for (a = 1; a < 10; a++)
	{
		int c = 0;
		if (b[a - 1] > b[a])
		{
			c = b[a - 1];
			b[a - 1] = b[a];
			b[a] = c;

		}
	}
	printf("%d", b[9]);
	return 0;
}